package com.example.adminservice.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author 软工2104-李家强-2100770248
 * @since 2023-09-28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("admin")
@ApiModel(value = "Admin对象", description = "管理员表的实体类")
public class Admin implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("管理员ID")
    @TableId("admin_id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long adminId;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("是否封禁: true可用, false不可用")
    @TableField("is_available")
    private Boolean isAvailable;

    @ApiModelProperty("类型: 0读者, 1作者, 2管理员")
    @TableField("type")
    private Integer type;

    @ApiModelProperty("管理员头像")
    @TableField("photo")
    private String photo;

}
